/*
 * Passager.h
 *
 *  Created on: 10 mars 2011
 *      Author: Julien
 */

#ifndef PASSAGER_H_
#define PASSAGER_H_

#include "Station.h"
#include "pthread.h"

class Passager {
private:
	Station* stationMontee; // Station à laquelle le passager prend le tramway.
	bool aUnTicket;
	bool estAbonne;
	pthread_t thread;
	Rame * rame; //Rame dans laquelle monte le passager.
	int placeFileAttenteStation;

public:
	Passager(Station * station);
	void attendreTramway();
	void rejoindreFileAttente();
	void acheterTicket();
	void demanderArret();
	static void * threadPassager(void * params);
	void demarrerThread();
	pthread_t getThread();
	virtual ~Passager();
};

#endif /* PASSAGER_H_ */
